package practicaplg.Analizadores;

import java.util.ArrayList;
import java.util.Iterator;

public class TokenList {

	private ArrayList<Token> lista;
	
	public TokenList(){
		lista = new ArrayList<Token>();
	}
	
	public ArrayList<Token> getLista(){
		return lista;
	}
	
	public void anadir(Token t){
		
		lista.add(t);
	}
	
	public String toString(){
		String s = "****************************************\n";
		Iterator<Token> it = lista.iterator();
		while(it.hasNext()){
			
			s += it.next() + "\n";
		}
		return s;
		
	}
}
